﻿@model System.Collections.Generic.List<PNProject.Models.LocationModel> 
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/AdminLayout.cshtml";
}

<div style="padding:10px; width:775px; min-height:10px; overflow:hidden; padding-bottom:20px;">
   <a class="newobject" href="AdminMap/Create">Tạo mới</a>

   <br />
    <br />
    @if (Model != null)
    {
       foreach (var item in Model)
       {
           var divId = "can_" + item.LocaitonId;
             <div class="boxpro">
                 <div class="picpro-1">
                     <table cellspacing="0" cellpadding="0" width="100%">
                         <tbody>
                             <tr>
                                 <td>@item.Address</td>
                                 <td class="pic_1">
                                     <a href="@Url.Action("Edit", "AdminMap", new {id = item.LocaitonId})">
                                         Edit
                                     </a>
                                 </td>
                             </tr>
                         </tbody>
                     </table>
                 </div>
             </div>
            <div id="@divId"></div>
         }
         <input id="hidIds" value="@ViewBag.Ids"/>
    }
    @* <div id="map-canvas"></div>*@
</div>
<script type="text/javascript">
    //var geocoder;
    //var map;
    //$(document).ready(function () {
    //    initialize();
    //    google.maps.event.addDomListener(window, 'load', initialize);
    //});
   
    //function initialize() {
    //    geocoder = new google.maps.Geocoder();
    //    var latlng = new google.maps.LatLng(-34.397, 150.644);
    //    var mapOptions = {
    //        zoom: 8,
    //        center: latlng
    //    };
    //    map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);
    //}
    //function setMaker(lat,lng) {
    //    var marker = new google.maps.Marker({
    //        map: map,
    //        position: results[0].geometry.location
    //    });
    //}

</script>